import Vue from 'vue'
import VueRouter from 'vue-router'
import Parent from '../views/Parent.vue'
import Child from '../views/Child.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'parent',
    component: Parent,
    meta: {
      index: 0
    }
  },
  {
    path: '/child',
    name: 'child',
    component: Child,
    meta: {
      index: 1
    }
  }
]

const router = new VueRouter({
  routes
})

export default router
